package com.zhou;

import com.zhou.Controller.WebSocket;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
//@ComponentScan(value = {"com.zhou"})
@EnableTransactionManagement
public class Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Application.class, args);
        //解决WebSocket不能注入的问题
        //WebSocketServer.setApplicationContext(configurableApplicationContext);
        WebSocket.setApplicationContext(run);
    }

}
